/*
 * VSMParser.h
 *
 *  Created on: Oct 26, 2011
 *      Author: zwx
 */

#include "../Include/includes.h"
#include "BooleanParser.h"
#include "BaseParser.h"
#ifndef VSMPARSER_H_
#define VSMPARSER_H_
using namespace std;

class VSMParser : public BaseParser{
public:
	VSMParser();
	virtual ~VSMParser();
	list<struct doc>* parse(char* query);
	list<struct doc>* weigh(struct posting* ps, int token_num);
	void rerank(list<struct doc>* rank);
	double calc_score(size_t doc_id, size_t tf, double boolean_score, double idf) ;
};

#endif /* VSMPARSER_H_ */
